import java.io.*;
import java.util.Scanner;



public class ParseTokens {
		private Stack<String> stack;
		
	public ParseTokens(){
		stack=new Stack();
		
	}
	
	
	
	public void parseTokens(Scanner file){
		PrintWriter output=null;
		
		output=FileUtils.PrintWriterOpen("zlog");
		String input="";
		String fileInput="";
		while(file.hasNext()){
			
			input=file.next();
			//output.printf("Token read as : %s %n",input);
			
			if(isOpenTag(input))
			{
				
				
				//fileInput=input.substring(1,input.length()-1);
				//output.println(fileInput+"\nopening token\n");
				
				
			}
			else if(isCloseTag(input))
			{
				
				
				//fileInput=input.substring(2,input.length()-1);
				//output.println(fileInput+"\nclosing token\n");
			}
			else {
				
				
				//fileInput=input;
				//output.println(fileInput+"\njust data\n");
			}
			
			
			
			
			
			
		}
		output.close();
	}
	public boolean isCloseTag(String data){
		if(data.charAt(0)=='<' && data.charAt(1)=='/' && data.charAt(data.length()-1)=='>'){
			return true;
		}
		else{
			return false;
		}
		
	}
	public boolean isOpenTag(String data){
		if(data.charAt(0)=='<' && data.charAt(data.length()-1)=='>' && data.charAt(1)!='/'){
			return true;
		}
		else{
			return false;
		}
	}
	
	public boolean checkValidXML(Scanner inFile){
		
		
		
		return false;
	}
	

	
	
}
